"use client";
import ComContainer from "@/components/ComContainer";
import Menu from "@/components/Menu";
import { MENU_ITEMS } from "@/configs/constant";
import styles from "./page.module.scss";
import { useRouter } from "next/navigation";
export default function PersonalCourseLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  const router = useRouter();
  const handleRouter = (value: string) => {
    value === "PersonalCourse"
      ? router.push("/PersonalCourse")
      : router.push(`/PersonalCourse/${value}`);
  };
  return (
    <ComContainer ContentWidth={1000}>
      <Menu
        menuItems={MENU_ITEMS}
        className={styles["menu"]}
        handleRouter={handleRouter}
      />
      {children}
    </ComContainer>
  );
}
